namespace ManoMachine.Emulator
{
    using System.ComponentModel;

    public class MemoryItem : INotifyPropertyChanged
    {
        private short value;

        public short Value
        {
            get
            {
                return this.value;
            }
            set
            {
                this.value = value;
                this.OnPropertyChanged("Value");
            }
        }

        public ushort Address
        {
            get;
            set
                ;
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}